@echo off
setlocal enabledelayedexpansion
echo "goap"
set port=%1

REM 检查UDP端口占用情况
echo Checking UDP port %port%
netstat -ano | findstr "UDP" | findstr ":%port%" > nul
if !errorlevel! equ 0 (
    echo Port %port% is in use
    exit /b 2
) else (
    echo Port %port% is available
    exit /b 0
)
